Skip to content

feat(agent): add Gemini CLI install target#57

Open
merlinsantiago982-cmd wants to merge 4 commits into
TestSprite:mainfrom
merlinsantiago982-cmd:feat/gemini-agent-target
Open

feat(agent): add Gemini CLI install target#57
merlinsantiago982-cmd wants to merge 4 commits into
TestSprite:mainfrom
merlinsantiago982-cmd:feat/gemini-agent-target

Conversation

@merlinsantiago982-cmd

@merlinsantiago982-cmd merlinsantiago982-cmd commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • add a gemini agent target that installs TestSprite guidance into GEMINI.md
  • generalize managed-section metadata so Codex and Gemini can each preserve user-authored root instruction files
  • update agent docs, help snapshots, and install/list coverage

Safety

  • GEMINI.md uses sentinel-delimited managed-section writes, so existing project instructions outside the TestSprite block are preserved
  • re-running install replaces only the TestSprite section

Tests

  • npm run format:check
  • npm run test -- src/lib/agent-targets.test.ts src/commands/agent.test.ts test/help.snapshot.test.ts
  • npm run typecheck
  • npm run lint
  • npm run build

Summary by CodeRabbit

  • New Features
    • Added Gemini as a supported agent target for setup and installs.
    • Added --skill support for agent install, enabling single-skill installs and multi-skill selections; install and list results now report selected skills.
  • Documentation
    • Updated Quickstart and command docs to include Gemini.
    • Refreshed test code get/put documentation to clarify Python outputs and replacement requirements.
  • Bug Fixes
    • Improved managed-section handling so Gemini/managed installs correctly create or update the appropriate managed files.
  • Tests
    • Expanded end-to-end coverage for Gemini and multi-skill installs.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR generalizes agent installation to a multi-skill model, adds gemini managed-section support, updates install/list and init flows to carry skill information, and revises related tests and documentation for the new target and Python test code workflows.

Changes

Multi-skill agent registry and CLI

Layer / File(s) Summary
Skill registry and rendering core
src/lib/agent-targets.ts, src/lib/skill-nudge.ts
Expands target and skill types, adds managed-section metadata, defines the multi-skill registry, rewrites target rendering and path resolution, and updates verify-skill detection to use per-target sentinels.
runInstall multi-skill handling
src/commands/agent.ts
Updates install option and result shapes, validates selected skills, builds managed sections from per-target sentinels, writes per-skill own files, and adds skill-aware list output and CLI wiring.
Init summary and documentation updates
src/commands/init.ts, DOCUMENTATION.md, README.md, docs/cli-v1-agent-install/onboard-skill-template.md, skills/testsprite-onboard.skill.md, skills/testsprite-verify.codex.md, skills/testsprite-verify.skill.md
Extends init summaries to include installed skills, aggregates per-skill install actions, and revises agent-install and test-code documentation for gemini and Python workflows.
Agent target and command test updates
src/lib/agent-targets.test.ts, src/commands/agent.test.ts, src/lib/skill-nudge.test.ts, test/e2e/agent-install.e2e.test.ts, test/e2e/setup.e2e.test.ts
Updates unit and e2e coverage for gemini, explicit skill arguments, multi-skill install/list flows, path safety, overwrite cases, and matrix coverage.

Estimated code review effort: 4 (Complex) | ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 77.27% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Clearly summarizes the main change: adding a Gemini install target to agent installs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/commands/agent.ts (1)

499-544: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Report the composed managed-file byte count in dry-run output.

Line 534 computes wouldBeBytes, but Line 543 still records bytes from only the managed section. For an append/replace into an existing AGENTS.md/GEMINI.md, the dry-run “would write” size under-reports the actual resulting file size.

Proposed fix
-        const bytes = Buffer.byteLength(section, 'utf8');
         let wouldBeContent = section;
@@
-        dryRunLines.push({ abs, bytes, note: 'managed section' });
+        dryRunLines.push({ abs, bytes: wouldBeBytes, note: 'managed section' });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/agent.ts` around lines 499 - 544, The dry-run output in the
agent command reports the wrong byte count because `dryRunLines.push` in
`src/commands/agent.ts` still uses `bytes` instead of the computed
`wouldBeBytes`. Update the dry-run record for the managed section so it reflects
the final composed file size after `classifySection`/`composeManagedFile` logic,
including append and replace cases. Keep the warning and result behavior
unchanged, but make the reported “would write” size match the actual post-write
content.
🧹 Nitpick comments (4)
src/commands/agent.ts (1)

325-330: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Generalize the managed-section comments beyond Codex.

Gemini now also uses managed-section mode, so these comments should describe “managed-section targets” rather than Codex specifically.

Proposed wording cleanup
-   * (`[skill]`); the codex managed-section target produces ONE result whose
+   * (`[skill]`); managed-section targets produce ONE result whose
    * section aggregates every installed skill (`[...skills]`).
-  // single AGENTS.md (so every codex row shares that path — truthful, since both
+  // single root instruction file (so managed-section rows share that path — truthful, since both

Also applies to: 764-767

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/agent.ts` around lines 325 - 330, The comments on the skill
result shape in agent.ts are too Codex-specific and should be generalized to
cover all managed-section targets. Update the documentation around the skills
field and the related managed-section comment block (including the matching
comment near the later section) so they refer to “managed-section targets”
instead of “Codex,” while keeping the behavior description about own-file
targets versus aggregated managed-section results.
src/commands/agent.test.ts (1)

1418-1440: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add Gemini repeat-install coverage for the managed block.

This new suite covers append, but the PR safety claim also depends on repeated Gemini installs replacing exactly one TestSprite block while preserving surrounding GEMINI.md content. Add a second run/assertion for exactly one begin/end sentinel and unchanged user text.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/agent.test.ts` around lines 1418 - 1440, The new Gemini append
test in runInstall only verifies the first install path, but it should also
cover repeat-install behavior for the managed section. Extend the existing
runInstall — gemini managed-section: append test to perform a second run with
the same target and assert that GEMINI.md still preserves the user content while
containing exactly one managed block bounded by
TARGETS.gemini.managedSection!.begin and TARGETS.gemini.managedSection!.end. Use
the existing runInstall, TARGETS.gemini.managedSection, and makeMemFs helpers to
confirm repeated installs replace the TestSprite block instead of duplicating
it.
src/lib/agent-targets.test.ts (1)

694-716: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a Gemini onboard rendering assertion.

The new Gemini target is installed with DEFAULT_SKILLS, but this suite only exercises Gemini with testsprite-verify. Add one test for testsprite-onboard so the shared GEMINI.md path and managed-section contribution stay covered.

Proposed test coverage
   it('renderForTarget("gemini") without body arg uses the managed-section asset', () => {
     const result = renderForTarget('gemini', 'testsprite-verify');
     expect(result.content).toContain('testsprite test run');
     expect(result.content).not.toContain('name: testsprite-verify');
     expect(result.content).not.toContain('alwaysApply:');
   });
+
+  it('renderForTarget("gemini") supports the onboard managed-section contribution', () => {
+    const result = renderForTarget('gemini', 'testsprite-onboard');
+    expect(result.path).toBe('GEMINI.md');
+    expect(result.content).toBe(ONBOARD_CODEX_LINE);
+    expect(result.content).not.toContain('---');
+  });
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/agent-targets.test.ts` around lines 694 - 716, Add a Gemini
onboarding coverage test in the existing renderForTarget("gemini") suite so the
shared GEMINI.md path is verified for testsprite-onboard as well as
testsprite-verify. Reuse renderForTarget and assert that the onboard target
resolves to GEMINI.md and includes the managed-section content expected from
DEFAULT_SKILLS, keeping the assertion alongside the current gemini
content-integrity tests.
src/lib/agent-targets.ts (1)

136-140: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update pathFor docs to include Gemini’s shared path.

The comment still says only Codex lands in a shared root file, but gemini also ignores skill and returns GEMINI.md.

Proposed JSDoc tweak
- * skills coexist; the codex target always lands at the single shared `AGENTS.md`
- * (every skill's codex contribution is merged into one managed section there).
+ * skills coexist; managed-section targets land at shared root instruction files
+ * (`AGENTS.md` for codex, `GEMINI.md` for gemini), where every selected skill's
+ * contribution is merged into one managed section.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/agent-targets.ts` around lines 136 - 140, The JSDoc for pathFor is
outdated: it says only codex uses a shared root file, but gemini also ignores
the skill and maps to a single shared file. Update the comment near pathFor in
agent-targets.ts to mention both codex and gemini shared landing paths, and keep
the target-specific behavior clear for own-file targets.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/agent-targets.ts`:
- Around line 322-326: The remaining renderForTarget call site is still passing
only the target, so the missing second argument is being treated as the skill id
and causing the unknown skill failure. Update the call in the agent install e2e
test to pass both the AgentTarget and the intended skill string, matching the
new renderForTarget(t, skill, body?) signature and other call sites.

---

Outside diff comments:
In `@src/commands/agent.ts`:
- Around line 499-544: The dry-run output in the agent command reports the wrong
byte count because `dryRunLines.push` in `src/commands/agent.ts` still uses
`bytes` instead of the computed `wouldBeBytes`. Update the dry-run record for
the managed section so it reflects the final composed file size after
`classifySection`/`composeManagedFile` logic, including append and replace
cases. Keep the warning and result behavior unchanged, but make the reported
“would write” size match the actual post-write content.

---

Nitpick comments:
In `@src/commands/agent.test.ts`:
- Around line 1418-1440: The new Gemini append test in runInstall only verifies
the first install path, but it should also cover repeat-install behavior for the
managed section. Extend the existing runInstall — gemini managed-section: append
test to perform a second run with the same target and assert that GEMINI.md
still preserves the user content while containing exactly one managed block
bounded by TARGETS.gemini.managedSection!.begin and
TARGETS.gemini.managedSection!.end. Use the existing runInstall,
TARGETS.gemini.managedSection, and makeMemFs helpers to confirm repeated
installs replace the TestSprite block instead of duplicating it.

In `@src/commands/agent.ts`:
- Around line 325-330: The comments on the skill result shape in agent.ts are
too Codex-specific and should be generalized to cover all managed-section
targets. Update the documentation around the skills field and the related
managed-section comment block (including the matching comment near the later
section) so they refer to “managed-section targets” instead of “Codex,” while
keeping the behavior description about own-file targets versus aggregated
managed-section results.

In `@src/lib/agent-targets.test.ts`:
- Around line 694-716: Add a Gemini onboarding coverage test in the existing
renderForTarget("gemini") suite so the shared GEMINI.md path is verified for
testsprite-onboard as well as testsprite-verify. Reuse renderForTarget and
assert that the onboard target resolves to GEMINI.md and includes the
managed-section content expected from DEFAULT_SKILLS, keeping the assertion
alongside the current gemini content-integrity tests.

In `@src/lib/agent-targets.ts`:
- Around line 136-140: The JSDoc for pathFor is outdated: it says only codex
uses a shared root file, but gemini also ignores the skill and maps to a single
shared file. Update the comment near pathFor in agent-targets.ts to mention both
codex and gemini shared landing paths, and keep the target-specific behavior
clear for own-file targets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a616caba-7f61-492f-8194-260254a50514

📥 Commits

Reviewing files that changed from the base of the PR and between 15e95de and 31f4ee0.

⛔ Files ignored due to path filters (1)
  • test/__snapshots__/help.snapshot.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (6)
  • DOCUMENTATION.md
  • README.md
  • src/commands/agent.test.ts
  • src/commands/agent.ts
  • src/lib/agent-targets.test.ts
  • src/lib/agent-targets.ts

Comment thread src/lib/agent-targets.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
test/e2e/agent-install.e2e.test.ts (2)

146-244: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing gemini managed-section content-integrity test.

This suite adds a thorough codex-specific test (Lines 209–244) verifying exactly-one sentinel pair, ordering, and both skills' content in AGENTS.md. Since gemini is now a second managed-section target using its own sentinel pair (GEMINI_MANAGED_SECTION_BEGIN/END), and preserving user content around this sentinel-delimited block is a headline feature of this PR, there's no equivalent test verifying GEMINI.md's managed-section behavior (sentinel presence/count, ordering, content, and no-frontmatter-fence check).

Without this, the exact behavior described in the PR objectives — "existing content outside the TestSprite block is preserved" for GEMINI.md — is untested at the e2e level.

Suggested addition (mirrors the codex test)
it('gemini GEMINI.md contains ONE managed section with both verify and onboard content', () => {
  const tmpDir = freshTmpDir();
  runCli(['agent', 'install', '--target=gemini', '--dir', tmpDir, '--output', 'json']);

  const filePath = join(tmpDir, TARGETS.gemini.path);
  const content = readFileSync(filePath, 'utf8');

  const beginCount = (
    content.match(
      new RegExp(GEMINI_MANAGED_SECTION_BEGIN.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'),
    ) ?? []
  ).length;
  const endCount = (
    content.match(
      new RegExp(GEMINI_MANAGED_SECTION_END.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'),
    ) ?? []
  ).length;
  expect(beginCount).toBe(1);
  expect(endCount).toBe(1);
  expect(content.indexOf(GEMINI_MANAGED_SECTION_BEGIN)).toBeLessThan(
    content.indexOf(GEMINI_MANAGED_SECTION_END),
  );
  expect(content).toContain('TestSprite Verification Loop');
  expect(content).toContain('First-time setup');
  expect(content.startsWith('---')).toBe(false);
});
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/agent-install.e2e.test.ts` around lines 146 - 244, Add an e2e test
for the gemini managed-section target to match the existing codex coverage:
after running agent install for TARGETS.gemini, read the generated GEMINI.md and
verify exactly one GEMINI_MANAGED_SECTION_BEGIN and GEMINI_MANAGED_SECTION_END
pair exists in the correct order, the content includes both the verification and
onboard strings, and the file does not start with frontmatter fences. Mirror the
structure of the existing codex test in test/e2e/agent-install.e2e.test.ts so
the gemini-specific managed-section behavior is validated with the same
sentinel-count and content-integrity checks.

433-472: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Multi-target install test omits the new gemini target.

The explicit CLI arg list --target=claude,cursor,cline,antigravity,codex (Line 433) excludes gemini, even though the matrix coverage guard (Lines 822-830 in this same file) enforces that TARGETS includes gemini. This leaves the multi-target install path (targets + skills together in one invocation) untested for the very target this PR introduces.

Suggested fix
-  it('--target=claude,cursor,cline,antigravity,codex writes all targets + skills, exit 0', () => {
+  it('--target=claude,cursor,cline,antigravity,codex,gemini writes all targets + skills, exit 0', () => {
     const tmpDir = freshTmpDir();
     const result = runCli([
       'agent',
       'install',
-      '--target=claude,cursor,cline,antigravity,codex',
+      '--target=claude,cursor,cline,antigravity,codex,gemini',
       '--dir',
       tmpDir,
       '--output',
       'json',
     ]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/agent-install.e2e.test.ts` around lines 433 - 472, The multi-target
install e2e test in the agent install spec is missing coverage for the newly
added gemini target, so the combined install path is not exercised for it.
Update the target list used by the `it('--target=... writes all targets +
skills, exit 0')` case to include gemini alongside the existing targets, and
make sure the assertions in the loop naturally verify gemini’s installed output
according to its `TARGETS[gemini].mode`. Keep the test aligned with the
`TARGETS` matrix guard so this scenario covers every supported target introduced
by the CLI.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/cli-v1-agent-install/onboard-skill-template.md`:
- Around line 20-26: The onboarding boundary is ambiguous because “0–1 tests”
overlaps with the verify path for repos that already have tests. Update the
onboarding guidance in the skill template to make the threshold explicit and
exclusive, and ensure the wording around the TestSprite repo eligibility clearly
routes any repo with at least one existing test to testsprite-verify while
onboarding only truly testless repos.

In `@README.md`:
- Line 70: The README callout and Agent command table are out of sync with the
new Gemini multi-skill flow. Update the setup guidance in README to describe
that `testsprite setup` installs the multi-skill verification flow rather than a
single verification skill, and add `gemini` to the supported agent list in the
Agent command table. Use the existing README sections around the coding-agent
callout and the Agent table to keep the wording consistent.

In `@src/commands/agent.ts`:
- Around line 440-445: Make getManagedSection() target-aware instead of always
caching buildCodexAggregate(skills) for every managed section. Update the
managed-section body selection in agent.ts so the cached aggregate is keyed by
the current target or computed per target, and pass the correct target into
buildCodexAggregate for each ManagedSectionSpec. Ensure --target gemini writes
the Gemini-specific aggregate into GEMINI.md, while codex,gemini installs can
produce distinct managed content for each target.

---

Nitpick comments:
In `@test/e2e/agent-install.e2e.test.ts`:
- Around line 146-244: Add an e2e test for the gemini managed-section target to
match the existing codex coverage: after running agent install for
TARGETS.gemini, read the generated GEMINI.md and verify exactly one
GEMINI_MANAGED_SECTION_BEGIN and GEMINI_MANAGED_SECTION_END pair exists in the
correct order, the content includes both the verification and onboard strings,
and the file does not start with frontmatter fences. Mirror the structure of the
existing codex test in test/e2e/agent-install.e2e.test.ts so the gemini-specific
managed-section behavior is validated with the same sentinel-count and
content-integrity checks.
- Around line 433-472: The multi-target install e2e test in the agent install
spec is missing coverage for the newly added gemini target, so the combined
install path is not exercised for it. Update the target list used by the
`it('--target=... writes all targets + skills, exit 0')` case to include gemini
alongside the existing targets, and make sure the assertions in the loop
naturally verify gemini’s installed output according to its
`TARGETS[gemini].mode`. Keep the test aligned with the `TARGETS` matrix guard so
this scenario covers every supported target introduced by the CLI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f9841f74-68d7-46c3-ad9b-01e71690d52d

📥 Commits

Reviewing files that changed from the base of the PR and between 8898ca6 and fcc3929.

📒 Files selected for processing (15)
  • DOCUMENTATION.md
  • README.md
  • docs/cli-v1-agent-install/onboard-skill-template.md
  • skills/testsprite-onboard.skill.md
  • skills/testsprite-verify.codex.md
  • skills/testsprite-verify.skill.md
  • src/commands/agent.test.ts
  • src/commands/agent.ts
  • src/commands/init.ts
  • src/lib/agent-targets.test.ts
  • src/lib/agent-targets.ts
  • src/lib/skill-nudge.test.ts
  • src/lib/skill-nudge.ts
  • test/e2e/agent-install.e2e.test.ts
  • test/e2e/setup.e2e.test.ts
✅ Files skipped from review due to trivial changes (1)
  • DOCUMENTATION.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/lib/agent-targets.ts
  • src/lib/agent-targets.test.ts
  • src/commands/agent.test.ts

Comment on lines +20 to +26
one-line `ONBOARD_CODEX_LINE` from the registry, because AGENTS.md is always-on
with a 32 KiB budget.
-->

# TestSprite: onboard a repo with a seed test suite

Your job is to take a repo that has **no TestSprite tests yet** and leave it with a

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Tighten the onboarding boundary.

0–1 tests conflicts with the later rule that projects which already have tests belong to testsprite-verify. A repo with one existing test matches both skills, so please make the cutoff explicit.

Suggested fix
-- Right after `testsprite setup`, or any time the active project has 0–1 tests.
+- Right after `testsprite setup`, or any time the active project has 0 tests.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/cli-v1-agent-install/onboard-skill-template.md` around lines 20 - 26,
The onboarding boundary is ambiguous because “0–1 tests” overlaps with the
verify path for repos that already have tests. Update the onboarding guidance in
the skill template to make the threshold explicit and exclusive, and ensure the
wording around the TestSprite repo eligibility clearly routes any repo with at
least one existing test to testsprite-verify while onboarding only truly
testless repos.

Comment thread README.md
```

> **Pointing a coding agent (Claude Code, Cursor, Codex, Cline, …) at TestSprite?** Have it run `testsprite setup` first — that installs the verification skill, so the agent knows how to create, run, and triage tests on its own (instead of guessing from this README). New here? Start with the **[getting-started overview](https://docs.testsprite.com/cli/getting-started/overview)**.
> **Pointing a coding agent (Claude Code, Gemini CLI, Cursor, Codex, Cline, …) at TestSprite?** Have it run `testsprite setup` first — that installs the verification skill, so the agent knows how to create, run, and triage tests on its own (instead of guessing from this README). New here? Start with the **[getting-started overview](https://docs.testsprite.com/cli/getting-started/overview)**.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the README aligned with the new Gemini multi-skill flow.

This callout still says testsprite setup installs a single verification skill, and the Agent command table still omits gemini. That leaves the README contradicting the new install behavior and understating the newly supported target.

Also applies to: 113-113

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 70, The README callout and Agent command table are out of
sync with the new Gemini multi-skill flow. Update the setup guidance in README
to describe that `testsprite setup` installs the multi-skill verification flow
rather than a single verification skill, and add `gemini` to the supported agent
list in the Agent command table. Use the existing README sections around the
coding-agent callout and the Agent table to keep the wording consistent.

Comment thread src/commands/agent.ts
Comment on lines +440 to +445
let managedSectionBodyCache: string | undefined;
const getManagedSection = (managed: ManagedSectionSpec): string => {
if (managedSectionBodyCache === undefined) {
managedSectionBodyCache = buildCodexAggregate(skills);
}
return buildSection(managedSectionBodyCache, managed);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the managed-section aggregate target-aware.

getManagedSection() always builds its body with buildCodexAggregate(skills), then reuses that cached body for every managed-section target. That means --target gemini still writes the Codex aggregate into GEMINI.md, and a codex,gemini install can only produce identical managed content for both targets.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/agent.ts` around lines 440 - 445, Make getManagedSection()
target-aware instead of always caching buildCodexAggregate(skills) for every
managed section. Update the managed-section body selection in agent.ts so the
cached aggregate is keyed by the current target or computed per target, and pass
the correct target into buildCodexAggregate for each ManagedSectionSpec. Ensure
--target gemini writes the Gemini-specific aggregate into GEMINI.md, while
codex,gemini installs can produce distinct managed content for each target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant